<template>
  <div class="icons">
    <div class="icon">
      <img src="http://bus.qunar.com/api/site/images/shaoshan.jpg">
      <p>热门景点</p>
    </div>
    <div class="icon">
      <img src="http://bus.qunar.com/api/site/images/zhangjiajie.jpg">
      <p></p>
    </div>
    <div class="icon">
      <img src="http://bus.qunar.com/api/site/images/hengyang.jpg"
           alt="">
      <p></p>
    </div>
    <div class="icon">
      <img src="http://bus.qunar.com/api/site/images/fenghuang.jpg"
           alt="">
    </div>
    <div class="icon">

    </div>
    <div class="icon">

    </div>
    <div class="icon">

    </div>
    <div class="icon"></div>
  </div>
</template>

<script>
export default {
  name: 'HomeIcons'
}
</script>

<style lang="stylus" scoped>
.icons {
  width: 100%;
  overflow: hidden;
  height: 0;
  padding-bottom: 50%; // 属性设置元素的下内边距
  background: green;

  .icon {
    float: left;
    width: 25%;
    padding-bottom: 25%;
    background: red;
  }
}
</style>
